ina_sources = [
    'ina.cpp',
    'ina_abi.cpp',
    'interface/i_ina.cpp',
] + chip_interface_sources
ina_lib = shared_library(
    'Ina',
    ina_sources,
    include_directories: [include_dirs, chip_inc, '..', '../..', '../../internal/', '../../internal/chip'],
    dependencies: [internal_dep, libmcpp_deps],
    name_prefix: 'lib',
    name_suffix: 'so',
    install: true,
    install_dir: drivers_install_dir,
)

ina_dep = declare_dependency(
    link_with: ina_lib,
    dependencies: [internal_dep, libmcpp_deps],
)

if build_tests
  custom_target(
    'copy_libIna',
    output: 'copy_libIna',
    command: ['cp', ina_lib.full_path(), drivers_install_dir],
    depends: ina_lib,
    build_by_default: true,
  )
endif